@use "styles/Radius.module.scss";
@use "styles/ScreenSizes.module.scss";
@use "styles/Spacings.module.scss";
@use "styles/Typography.module.scss";

.button_wrapper {
  font-size: Typography.$small;
  white-space: nowrap;
  padding-inline: Spacings.$spacing04;
  padding-block: Spacings.$spacing02;
  border-radius: Radius.$normal;
  border: 1.5px solid transparent;
  cursor: pointer;
  display: flex;
  width: fit-content;
  background-color: var(--background-0);
  height: fit-content;

  &.important {
    text-transform: uppercase;
  }

  &.dark {
    background-color: var(--background-1);

    &:hover,
    &.important {
      .label {
        color: var(--white-0);
      }
    }
  }

  &.hidden {
    display: none;
  }

  @media (max-width: ScreenSizes.$small) {
    padding-inline: Spacings.$spacing03;
    padding-block: Spacings.$spacing01;
    font-size: Typography.$tiny;
  }

  &.small {
    padding-inline: Spacings.$spacing03;
    padding-block: Spacings.$spacing01;
    font-size: Typography.$tiny;
  }

  &.disabled {
    border-color: var(--border-2);
    cursor: default;
    color: var(--text-1);
    background-color: var(--background-0);

    &.dark {
      opacity: 0.2;
    }
  }

  &.primary:not(.disabled) {
    border-color: var(--primary-0);
    color: var(--primary-0);

    &:hover,
    &.important {
      background-color: var(--primary-0);
      color: var(--text-0);
    }
  }

  &.dangerous:not(.disabled) {
    border-color: var(--dangerous);
    color: var(--dangerous);

    &:hover,
    &.important {
      background-color: var(--dangerous);
      color: var(--text-0);
    }
  }

  &.gold:not(.disabled) {
    border-color: var(--gold);
    color: var(--gold);

    &:hover,
    &.important {
      background-color: var(--gold);
      color: var(--text-0);
    }
  }

  .icon_label {
    display: flex;
    flex-direction: row;
    gap: Spacings.$spacing02;
    align-items: center;

    @media (max-width: ScreenSizes.$small) {
      .icon {
        display: none;
      }

      .label {
        font-size: Typography.$very_tiny;
      }
    }
  }
}
